import random
from sympy import Number
i=5000
while i>=499:
    a = random.randint(1,100)
    print("您当前还有"+str(i)+"当前随机数为"+str(a))
    print("请输入你猜的数字：")
    t = input()
    k = Number(t)
    print(k)
    if k==a:
        print("恭喜猜中,本轮幸运数字为", f"{a}")
        i = i+3000
    else:
        if k > a:
            print("大了")
            i = i - 500
        else:
            print("小了")
            i = i - 500
    print("您是否想要继续该游戏? yes/no")
    ans = input()
    if ans == "no":
        i=498
    else:
        i=i
